package com.ruoyi.labs.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.labs.mapper.JwUndergraduateLabsMapper;
import com.ruoyi.labs.domain.JwUndergraduateLabs;
import com.ruoyi.labs.service.IJwUndergraduateLabsService;

/**
 * 实验室管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-13
 */
@Service
public class JwUndergraduateLabsServiceImpl implements IJwUndergraduateLabsService 
{
    @Autowired
    private JwUndergraduateLabsMapper jwUndergraduateLabsMapper;

    /**
     * 查询实验室管理
     * 
     * @param id 实验室管理主键
     * @return 实验室管理
     */
    @Override
    public JwUndergraduateLabs selectJwUndergraduateLabsById(Long id)
    {
        return jwUndergraduateLabsMapper.selectJwUndergraduateLabsById(id);
    }

    /**
     * 查询实验室管理列表
     * 
     * @param jwUndergraduateLabs 实验室管理
     * @return 实验室管理
     */
    @Override
    @DataScope(deptAlias = "d",userAlias = "d")
    public List<JwUndergraduateLabs> selectJwUndergraduateLabsList(JwUndergraduateLabs jwUndergraduateLabs)
    {
        return jwUndergraduateLabsMapper.selectJwUndergraduateLabsList(jwUndergraduateLabs);
    }

    /**
     * 新增实验室管理
     * 
     * @param jwUndergraduateLabs 实验室管理
     * @return 结果
     */
    @Override
    public int insertJwUndergraduateLabs(JwUndergraduateLabs jwUndergraduateLabs)
    {
        return jwUndergraduateLabsMapper.insertJwUndergraduateLabs(jwUndergraduateLabs);
    }

    /**
     * 修改实验室管理
     * 
     * @param jwUndergraduateLabs 实验室管理
     * @return 结果
     */
    @Override
    public int updateJwUndergraduateLabs(JwUndergraduateLabs jwUndergraduateLabs)
    {
        jwUndergraduateLabs.setUpdateTime(DateUtils.getNowDate());
        return jwUndergraduateLabsMapper.updateJwUndergraduateLabs(jwUndergraduateLabs);
    }

    /**
     * 批量删除实验室管理
     * 
     * @param ids 需要删除的实验室管理主键
     * @return 结果
     */
    @Override
    public int deleteJwUndergraduateLabsByIds(Long[] ids)
    {
        return jwUndergraduateLabsMapper.deleteJwUndergraduateLabsByIds(ids);
    }

    /**
     * 删除实验室管理信息
     * 
     * @param id 实验室管理主键
     * @return 结果
     */
    @Override
    public int deleteJwUndergraduateLabsById(Long id)
    {
        return jwUndergraduateLabsMapper.deleteJwUndergraduateLabsById(id);
    }
}
